Channel encoding is used in communication systems to improve data transmission reliability, so as to ensure communication quality. Polar codes, proposed by Professor Arikan of Turkey, are the first kind of codes that are theoretically proven to be able to achieve the Shannon capacity and having low encoding and decoding complexity.
A polar code is a linear block code. An encoding matrix of the polar code is GN, which is an N×N matrix.
An encoding process for generating a polar code x1N is:x1N=u1NGN where u1N=(u1, u2, . . . , uN ) is a binary row vector having a length of N bits (N is also called a mother code length), GN is the coding matrix, and GN =F2⊗(log2(N)) . F2⊗(log2(N)) is a Kronecker product of log2N matrices F2, and the matrix F2 is:
      F    2    =      [                            1                          0                                      1                          1                      ]  
In the encoding process of the polar code, some bits in the row vector u1N are used to carry information, and these bits are referred to as information bits. An index set of these bits is represented by A. Other bits are set to a fixed value that is pre-agreed upon between a receiving end and a transmitting end of the polar code, and these bits are referred to as fixed bits or frozen bits. An index set of the fixed bits or frozen bits is represented by Ac, which is a complement set of A.
The encoding process of the polar code is equivalent toX1N=uAGN(A)⊕uACGN(AC).Herein, GN(A) is a submatrix formed by rows in the GN that correspond to indexes in the set A, and GN(Ac) is a submatrix formed by rows in the GN that correspond to indexes in the set Ac. uA is an information bit set of the u1N, and the number of the information bits in the uA is K. uAc is a frozen bit set of the u1N, and the number of the frozen bits in the uAc is N−K.
The frozen bits are known bits. Value of the frozen bits is normally set to 0, but the value of the frozen bits may be randomly set, provided that the receiving end and the transmitting end of the polar code have pre-agreed on the value of the frozen bits. When the frozen bits are set to 0, a polar code encoding output may be simplified as x1N=uAGN(A), in which GN(A) is a K×N matrix.
A process of constructing a polar code is a process of selecting the set A, and the selection of the set A determines the performance of the polar code. The process of constructing the polar code normally includes: determining, based on a mother code length N, that a total of N polarized channels exist, where each of the polarized channels corresponds to one row in an encoding matrix, respectively; calculating a reliability of each of the polarized channels; forming the information bit index set A using indexes of first K polarized channels with relatively high reliabilities, and forming the frozen bit index set Ac using indexes of the remaining (N−K) polarized channels. The set A determines bit positions of the information bits in x1N, and the set Ac determines bit positions of the frozen bits in x1N.
It can be learned from the encoding matrix that a code length of an original polar code (mother code) is an integer power of 2. In practical applications, however, length of a polar code need to be set to any code length, and this is achieved by a process called rate matching.
In current technology, solutions of the rate matching include puncturing and shortening. This means that, in encoding, when a length of the mother code is larger than a length of a target code, the target code is obtained by puncturing or shortening the mother code, and during decoding, the length of the mother code is restored from the target code by padding. In the situations when the mother code includes a relatively large quantity of information bits, rate matching by directly puncturing or shortening the mother code may lead to information loss during decoding.